<?php
	require("function.php");
	header('Content-type:text/html;charset=utf-8');
	$con = getconnect("china");
	$city=substr($_GET['district'],0,6);
	$sql = "select * from china_copy where city like '%$city%' limit 0,24";
	$result = mysqli_query($con,$sql);
	$arr= array();
	$i=0;
	while($row=mysqli_fetch_assoc($result)){
		$temp = explode("：",$row['standard_deviation']);
		$arr[$i]=$temp[1].",";
		$temp = explode(" ",$row['climate']);
		$arr[$i].=$temp[1].",";
		$temp = explode("：",$row['trend']);
		$arr[$i].=$temp[1].",";
		$arr[$i].=$row['weather'];
		$i++;
	}
	echo json_encode($arr);
?>